#include "GameObject.h"
static long long objectID = 0;
#include <iostream>
GameObject::GameObject(void)
	:
	m_objectType(OBJECT_TYPE::BASE),
	m_objectID(objectID++),
	m_position()
{

}
GameObject::GameObject(OBJECT_TYPE type)
	:
	m_objectType(type),
	m_objectID(objectID++),
	m_position()
{

}
GameObject::~GameObject(void)
{

}
void GameObject::Copy(void* address)
{

}
long long GameObject::GetID(void)
{
	return m_objectID;
}
Position& GameObject::GetPosition(void)
{
	return m_position;
}
void GameObject::SetPosition(int x, int y)
{
	m_position.x = x;
	m_position.y = y;
}
int GameObject::GetDistanceTo(GameObject& obj)
{
	int dist = 0;
	int x1 = m_position.x;
	int y1 = m_position.y;
	int x2 = obj.GetPosition().x;
	int y2 = obj.GetPosition().y;
	dist = sqrt(pow((float)x1 - x2, 2) + pow((float)y1 - y2, 2));

	return dist;
}
OBJECT_TYPE GameObject::GetObjType(void)
{
	return m_objectType;
}
int GameObject::GetObjSize(void)
{
	return sizeof(*this);
}